package com.calvin.study.observer.event;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.context.ApplicationEvent;


public class MyEvent extends ApplicationEvent {

	private static final long serialVersionUID = 1L;

	private String time = new SimpleDateFormat("hh:mm:ss").format(new Date());
	private String msg;

	public MyEvent(Object source, String msg) {
		super(source);
		this.msg = msg;
	}

	public MyEvent(Object source) {
		super(source);
		System.out.println("myevent: " + source);
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
